<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>查看角色</title>
<link type="text/css" rel="stylesheet"
	href="${ctx }/js/ztree/css/zTreeStyle/zTreeStyle.css" />
<script type="text/javascript" src="${ctx }/js/bootstrap/jquery.js"></script>
<script type="text/javascript">
	var setting = {
			check: {
				enable: true
			},
			data: {
				simpleData: {
					enable: true
				}
			}
		};

		var zNodes =${permissionTree};
		
		var code;
		
		function setCheck() {
			var zTree = $.fn.zTree.getZTreeObj("permissionTree"),
			type =  { "Y" : "ps", "N" : "ps"};
			zTree.setting.check.chkboxType = type;
		}
		function showCode(str) {
			if (!code) code = $("#code");
			code.empty();
			code.append("<li>"+str+"</li>");
		}
		
		$(document).ready(function(){
			$.fn.zTree.init($("#permissionTree"), setting, zNodes);
			setCheck();
			$("#py").bind("change", setCheck);
			$("#sy").bind("change", setCheck);
			$("#pn").bind("change", setCheck);
			$("#sn").bind("change", setCheck);
		});
</script>
</head>
<body>
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
        try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
    </script>

		<ul class="breadcrumb">
			<li><i class="ace-icon fa fa-home home-icon"></i> <a
				href="${ctx }/home/home">首页</a></li>
			<li class="active">系统管理</li>
			<li class="active">角色管理</li>
		</ul>
		<!-- .breadcrumb -->
	</div>
	<div class="page-content">
		<div class="page-header">
			<h1>
				角色管理 <small> <i class="ace-icon fa fa-double-angle-right"></i> 查看角色
				</small>
			</h1>
		</div>
		<!-- /.page-header -->
		<div class="row">
			<div class="col-xs-12">
				<table style="width: 100%; border: 0;" class="project-default">
					<tr>
						<td><b>角色名称</b></td>
						<td style="text-align: left;">${entity.roleName }</td>
						<td><b>状态</b></td>
						<td style="text-align: left;"><select:write type="status"
								value="${entity.status }" /></td>
					</tr>
					<tr>
						<td><b>创建人</b></td>
						<td style="text-align: left;">${entity.createUser }</td>
						<td><b>创建时间</b></td>
						<td style="text-align: left;"><fmt:formatDate
								value="${entity.createTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					</tr>
					<tr>
						<td><b>说明</b></td>
						<td style="text-align: left;" colspan="3">${entity.rmk }</td>
					</tr>
					<tr>
						<td colspan="4">
							<ul id="permissionTree" class="ztree"></ul>
						</td>
					</tr>
				</table>
			</div>
			<div class="col-xs-12" style="text-align: center; margin-top: 20px;">
				<button type="button" class="btn btn-default"
					onclick="javascript:window.location.href='${ctx}/role/list'">返回</button>
			</div>

		</div>

	</div>
</body>
</html>